1. Field of the Invention
The present invention relates to a numerical controller, and more particularly, to a numerical controller including an overlap function between arbitrary blocks by a common acceleration/deceleration control unit.
2. Description of the Related Art
When a machining program is executed by a numerical controller, the following technique is generally used. That is, as shown in FIG. 5, moving commands of blocks included in a CNC command 100 such as the machining program are analyzed by a command analysis unit 10, interpolation process is executed by an interpolator 20 based on command data concerning movement of a drive unit (not shown) obtained as a result of the analysis, an interpolation pulse distributed by the interpolation process is subjected to acceleration/deceleration processing by an acceleration/deceleration control unit 30, and based on a result thereof, a drive unit such as a servomotor is controlled by a servo control unit 40. To suppress vibration generated by large acceleration, there is also widely known such a technique that a plurality of acceleration/deceleration control units 30 and 31 are provided in series as shown in FIG. 6, and acceleration/deceleration processing is executed in two stages to slow down (bell-shaped acceleration/deceleration) acceleration.
In execution of continuous blocks when a machining program is executed by a numerical controller, interpolation process and acceleration/deceleration processing of a moving command of a next block is started after interpolation process and acceleration/deceleration processing of a moving command of a block which is currently executed is completed. Whereas, there is also such a process method that the interpolation process and the acceleration/deceleration processing of a moving command of a next block are started after the interpolation process of a moving command of a block which is currently executed is completed and when the acceleration/deceleration processing is not yet completed. According to this method, since moving commands of two blocks are output in a state where the moving commands overlap each other, a tool path which is completely attuned to a machining program is not obtained, but distribution of a next block is started earlier, and correspondingly, machining time can be shortened.
When moving commands of the continuous two blocks overlap each other by this method, the acceleration/deceleration processing of the previous block and the next block are carried out by the same acceleration/deceleration control unit while the moving commands of the continuous two blocks overlap each other. Hence, there is a problem that the moving commands cannot overlap each other if a setting of the respective acceleration/deceleration of the previous and next two overlap blocks are different from each other. Here, JP 04-169907 A, for example discloses a technique for solving this problem by providing a plurality of acceleration/deceleration control units 30 and 31 in parallel (not in series) as shown in FIG. 7, and by executing the acceleration/deceleration control units 30 and 31 in parallel when moving commands of blocks overlap each other.
An example of overlapping processing between two blocks having different settings of acceleration/deceleration described in JP 04-169907 A will be described using FIG. 8.
A numerical controller 1 which carries out the overlapping processing shown in FIG. 8 has an acceleration/deceleration time constant Tr of a rapid traverse command (G00) and an acceleration/deceleration time constant Tc of a cutting feed command (such as G01 and G02 and G03), and acceleration/deceleration types of previous and next two blocks are set to linear acceleration/deceleration. FIG. 8 is a timing chart showing operations of an interpolator 20 and first and second acceleration/deceleration control units 30 and 31, and outputs of the acceleration/deceleration control units 30 and 31 when an N10 block and an N20 block overlap each other when the numerical controller 1 controls a machine tool based on a later-described program O0001.
O0001;
N10 G00 X100.;
N20 G01 X150. F500.;
M30;
First, for a command of the N10 block analyzed in the command analysis unit 10, forming operation of an interpolation pulse is started by the interpolator 20. The acceleration/deceleration control unit 30 forms the acceleration/deceleration time constant Tr and the acceleration/deceleration type into linear shapes based on the setting, an output of the interpolator 20 is subjected to the acceleration/deceleration control processing, and a speed pulse is produced (see <1> in FIG. 8).
The output of the interpolation pulse of the N10 block is completed in the interpolator 20. At this time, the acceleration/deceleration control unit 30 is executing the acceleration/deceleration control (see <2> in FIG. 8).
Forming operation of interpolation pulses is started by the interpolator 20 for a command of the N20 block analyzed by the command analysis unit 10 at the timing of start of overlap. An acceleration/deceleration control unit 31 forms the acceleration/deceleration time constant Tc and the acceleration/deceleration type into linear shapes based on the setting, and exercises acceleration/deceleration control processing over the output of the interpolator 20 to output a speed pulse. At this time, the acceleration/deceleration control unit 30 is executing the acceleration/deceleration control processing of the interpolation pulse of the N10 block, and a total speed pulse of the acceleration/deceleration control unit 30 and the acceleration/deceleration control unit 31 added by an adder 50 is output to the servo control unit 40 (see <3> in FIG. 8).
If the acceleration/deceleration control processing of the interpolation pulse of the N10 block in the acceleration/deceleration control unit 30 is completed, the overlap is completed, and a speed pulse is of only the N20 block which is output from the acceleration/deceleration control unit 31 (see <4> in FIG. 8).
According to the technique described in JP 04-169907 A, the overlap of the different acceleration/deceleration time constants and different acceleration/deceleration types is realized by preparing a plurality of acceleration/deceleration control units as described above. However, even if command types (such as rapid traverse, cutting feed) are the same, when a plurality of settings of acceleration/deceleration exist for each of blocks, i.e., when acceleration/deceleration time constants and acceleration/deceleration types such as linear shapes or bell-shapes are changed depending upon command speed, if the method as described in JP 04-169907 A in which a plurality of acceleration/deceleration control units are provided is used, it is necessary to add processes by an increment of the number of settings of acceleration/deceleration so that the acceleration/deceleration control units can be executed in parallel. As a result, there is a problem that if the kinds of the acceleration/deceleration are increased, the process becomes complicated correspondingly, and a process load is increased. Further, resources are also required in proportion to the number of settings of the acceleration/deceleration, and it becomes difficult to realize. If only overlap between two blocks is considered, it is possible to realize by sequentially switching between the settings by two acceleration/deceleration control units, but if a state where overlaps of three blocks or more are generated is taken into account, a case where the number of the acceleration/deceleration control units is only two is insufficient.